package base.objectoriented;

import java.util.Locale.Category;

import org.omg.CORBA.PRIVATE_MEMBER;

class Animal {
	private String name;
	
	Animal(String name){
		this.name = name;
	}
	
	public void enjoy(){
		System.out.println("叫声。。。。。。。");
	}
}

class Cat extends Animal {
	private String eyeColor;
	Cat(String n,String c){
		super(n);
		this.eyeColor = c;
		
	}
	
	public void enjoy(){
		System.out.println("喵喵");
	}
}


class Dog extends Animal {
	private String eyeColor;
	Dog(String n,String c){
		super(n);
		this.eyeColor = c;
		
	}
	
	public void enjoy(){
		System.out.println("汪汪");
	}
}



public class TestDuotai1 {
	public static void main(String[] args) {
		Animal cat = new Cat("kitty", "white");
		cat.enjoy();
		cat = new Dog("snoopy", "yellow");
		cat.enjoy();
		
	}
}
